package com.example.managesystem.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SetItemFailureMapper {
    @Select("select failure_text from setup_failure where item_id = #{itemId}")
    String getReason(Integer itemId);

    /**
     * 设置项目立项失败原因
     * @param itemId
     * @param failReason
     */
    @Insert("insert into setup_failure(item_id,failure_text) values(#{itemId},#{failReason})")
    void insertFailure(@Param("itemId") Integer itemId, @Param("failReason") String failReason);
}
